package com.hiultra.archive.domain;

import java.util.List;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hiultra.common.annotation.Excel;
import com.hiultra.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 销毁对象 arc_destroy
 *
 * @author ls
 * @date 2023-09-02
 */
public class ArcDestroy extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 销毁id
     */
    private Long destroyId;

    /**
     * 销毁单号
     */
    @Excel(name = "销毁单号")
    private String destroyNo;

    /**
     * 销毁名称
     */
    @Excel(name = "销毁名称")
    private String destroyName;

    /**
     * 销毁人
     */
    @Excel(name = "销毁人")
    private Long destroyUserId;

    /**
     * 销毁人
     */
    @Excel(name = "销毁人")
    private String destroyUserName;

    /**
     * 销毁部门
     */
    @Excel(name = "销毁部门")
    private Long destroyDeptId;

    /**
     * 销毁部门
     */
    @Excel(name = "销毁部门")
    private String destroyDeptName;

    /**
     * 销毁意见
     */
    @Excel(name = "销毁意见")
    private String destroyOpinion;

    /**
     * 销毁时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "销毁时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date destroyTime;

    /**
     * 单据状态（0正常 1停用）
     */
    @Excel(name = "单据状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 销毁详情信息
     */
    private List<ArcDestroyDetail> arcDestroyDetailList;

    public String getDestroyUserName() {
        return destroyUserName;
    }

    public void setDestroyUserName(String destroyUserName) {
        this.destroyUserName = destroyUserName;
    }

    public String getDestroyDeptName() {
        return destroyDeptName;
    }

    public void setDestroyDeptName(String destroyDeptName) {
        this.destroyDeptName = destroyDeptName;
    }

    public void setDestroyId(Long destroyId) {
        this.destroyId = destroyId;
    }

    public Long getDestroyId() {
        return destroyId;
    }

    public void setDestroyNo(String destroyNo) {
        this.destroyNo = destroyNo;
    }

    public String getDestroyNo() {
        return destroyNo;
    }

    public void setDestroyName(String destroyName) {
        this.destroyName = destroyName;
    }

    @NotBlank(message = "销毁名称不能为空")
    public String getDestroyName() {
        return destroyName;
    }

    public void setDestroyUserId(Long destroyUserId) {
        this.destroyUserId = destroyUserId;
    }

    @NotBlank(message = "销毁人不能为空")
    public Long getDestroyUserId() {
        return destroyUserId;
    }

    public void setDestroyDeptId(Long destroyDeptId) {
        this.destroyDeptId = destroyDeptId;
    }

    @NotBlank(message = "销毁部门不能为空")
    public Long getDestroyDeptId() {
        return destroyDeptId;
    }

    public void setDestroyOpinion(String destroyOpinion) {
        this.destroyOpinion = destroyOpinion;
    }

    public String getDestroyOpinion() {
        return destroyOpinion;
    }

    public void setDestroyTime(Date destroyTime) {
        this.destroyTime = destroyTime;
    }

    public Date getDestroyTime() {
        return destroyTime;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Size(min = 1, message = "销毁详情列表不能为空")
    public List<ArcDestroyDetail> getArcDestroyDetailList() {
        return arcDestroyDetailList;
    }

    public void setArcDestroyDetailList(List<ArcDestroyDetail> arcDestroyDetailList) {
        this.arcDestroyDetailList = arcDestroyDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("destroyId", getDestroyId())
                .append("destroyNo", getDestroyNo())
                .append("destroyName", getDestroyName())
                .append("destroyUserId", getDestroyUserId())
                .append("destroyDeptId", getDestroyDeptId())
                .append("destroyOpinion", getDestroyOpinion())
                .append("destroyTime", getDestroyTime())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("arcDestroyDetailList", getArcDestroyDetailList())
                .toString();
    }
}
